<!DOCTYPE html>
<html lang="zh-CN">

	<head>
		<meta charset="utf-8">
		<title>商品发布</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="../css/mui.min.css" />

	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">发布</h1>
			<a class="mui-icon mui-icon-more mui-icon-right-nav mui-pull-right"></a>
		</header>
		<div class="mui-content-padded" style="margin-top:30px;">
			<form class="mui-input-group">
				<div class="mui-input-row">
					<label>标题</label>
					<input type="text" id="title" placeholder="用户名">
				</div>
				<div class="mui-input-row">
					<label>宝贝类型</label>
					<select id="goodsType">
						<option value="1" selected="">电子图书</option>
						<option value="2">电子设备</option>
						<option value="3">其它</option>
					</select>
				</div>
				<div class="mui-input-row">
					<label>所属校区</label>
					<select id="campus">
						<option value="1" selected="">雅安校区</option>
						<option value="2">成都校区</option>
						<option value="3">都江堰校区</option>
					</select>
				</div>
				<div class="mui-input-row">
					<label>联系电话</label>
					<input type="text" id="phone" placeholder="请输入手机号">
				</div>
				<div class="mui-input-row">
					<label>价格</label>
					<input type="text" id="price" placeholder="请输入售价">
				</div>
				<div class="mui-input-row">
					<label>原始价格</label>
					<input type="text" id="originalPrice" placeholder="请输入商品原价">
				</div>
				<textarea placeholder="宝贝描述" id="des" style="height: 80px;"></textarea>
				<div style="width: 100%;height: 80px;">
					<img id="headimg1" onclick="selectImg('headimg1')" src="../images/g3.png" style="width: 80px;height: 80px;border: 1px silver dashed;text-align: center;float: left;margin-left: 20px">
					<img id="headimg2" onclick="selectImg('headimg2')" src="../images/g3.png" style="width: 80px;height: 80px;border: 1px silver dashed;text-align: center;float: left;margin-left: 20px;">
					<img id="headimg3" onclick="selectImg('headimg3')" src="../images/g3.png" style="width: 80px;height: 80px;border: 1px silver dashed;text-align: center;float: left;margin-left: 20px;">

				</div>

			</form>
			<div style="margin-top:20px;text-align: center;">
				<button class="mui-btn mui-btn-primary" onclick="pubGoods();">立即发布</button>

			</div>
		</div>
		
		<script type="text/javascript" src="../js/jquery-1.8.3.min.js"></script>
		<script src="../js/mui.min.js"></script>
		<script type="text/javascript" src="../js/app.js"></script>
		<script type="text/javascript" src="../js/common/const.js" ></script>
		<!--<script type="text/javascript" src="../js/1.js" ></script>-->
		<script type="text/javascript" src="../js/common/check.js" ></script>
		<script src="../js/common/upload.js"></script>
		<script>
			function pubGoods(){
				var goods = new Object();
				goods.title = $("#title").val();
				goods.des = $("#des").val();
				goods.campus = $("#campus").val();
				goods.price = $("#price").val();
				goods.goodsType = $("#goodsType").val();
				goods.originalPrice = $("#originalPrice").val();
				goods.stuIdToken = localStorage.getItem(LS_STU_ID_TOKEN);
				goods.loginToken = localStorage.getItem(LS_LOGIN_TOKEN);
				 upload(goods);
		
			}
		</script>
	</body>

</html>